<%-- 
    Document   : header
    Created on : May 2, 2013, 12:37:40 PM
    Author     : DIEM PHUONG
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
<link rel="stylesheet" type="text/css" href="CSS/styles.css" media="all">

<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/xml" prefix="x" %>

<div class="wrapper">
    <div class="header-bar">
        <!--Home-->
        <div id="logo"><a href="Controller?btnAction=home" title="Hat Club" class="logo"><img src="Pictures/logo2.png" style="width: 600px;margin-top: -27px;margin-left: -30px;" alt="Hat Club"></a></div>
        <!-- Account -->
        <div class="account">
            <c:choose>
                <c:when test="${not empty(sessionScope.USER)}">
                    <c:set var="user" value="${sessionScope.USER}"/>
                    <c:set var="role" value="${sessionScope.ROLE}"/>
                    <c:set var="fullname" value="${sessionScope.FULLNAME}"/>
                    <a style="float:left" href="Controller?btnAction=accountDetail"> <b>Welcome ${sessionScope.USER}!</b></a>
                </c:when>
                <c:otherwise>
                    <a href="Controller?btnAction=account">Account</a>
                </c:otherwise>
            </c:choose>
            <c:if test="${not empty(sessionScope.USER)}">
                <div class="log-out">
                    <a href="Controller?btnAction=logout">Logout</a>
                </div>
            </c:if>
        </div>

        <!-- Search -->
        <div id="search-area">
            <form action="Controller" method="POST">
                <dl>
                    <dt>
                        <input type="text" name="txtSearch" value="${param.txtSearch}" id="search" placeholder="Search..."/>
                        <button type="submit" name="btnAction" value="search">Search</button>
                    </dt>
                </dl>
            </form>
            <div class="clear"></div>
        </div>
    </div>
</div>